package com.supplychain.financial.parent.api;

import com.supplychain.financial.parent.entity.DTO.ActiveUser;
import com.supplychain.financial.parent.entity.DTO.OrderPayInfoDTO;
import com.supplychain.financial.parent.entity.DTO.PageDTO;
import com.supplychain.financial.parent.entity.DTO.SPLOrderDTO;
import com.supplychain.financial.parent.common.exception.CustomException;

import java.util.List;
import java.util.Map;

/**
 * Created by zhengchuan on 2017/3/14.
 */
public interface SPLOrderService {
    /**
     * 查询分页的烟草客户订单信息
     * @param page 当前页
     * @param pageSize 每页多少条
     * @param sortedKey 排序字段
     * @param sortedValue 排序方式
     * @param filters 过滤条件
     * @return 分页数据
     * @throws CustomException 异常信息
     */
    PageDTO<SPLOrderDTO> findSPLOrderByPage(Integer page, Integer pageSize, String sortedKey, String sortedValue, String filters) throws CustomException;

    /**
     * 获取订单支付详细信息
     * @param orderId
     * @return
     * @throws CustomException
     */
    List<OrderPayInfoDTO> getPayInfo(String orderId) throws CustomException;

    /**
     * 根据最后一条订单的创建时间来取之后的订单
     * @param lastOrderTime 创建时间
     * @return
     */
    List<SPLOrderDTO> findSPLOrderByLsatCreateTime(String lastOrderTime, ActiveUser activeUser) throws CustomException;

    Map<String,Object> findSPLOrderDayData(ActiveUser activeUser, String success) throws CustomException;

    Map<String,Object> findSPLOrderMonthData(ActiveUser activeUser, String success)  throws CustomException;

    Map<String,Object> findSPLOrderYearData(ActiveUser activeUser, String success)  throws CustomException;

    List<SPLOrderDTO> getOrderByTime(Map<String, Object> params) throws CustomException;

    String getIdByChannleName(String quXianName) throws CustomException;

    String getAllChannelIdByQuXianName(String quXianName) throws CustomException;

    Map<String,List<String>> findSPLOrderStatisticsDayData(Map<String, String> stringMap);

    Map<String,List<String>> findSPLOrderStatisticsWeekData(Map<String, String> stringMap);

    Map<String,List<String>> findSPLOrderStatisticsMonthData(Map<String, String> stringMap);

    PageDTO<Map<String,String>> findSPLOrderByPage(Map<String, String> stringMap);
}
